<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';

if($_RQ['op']=='list'){
	$post=get_postdata();
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	$pindex = max(1, intval($post['page']));
	$psize = 10;
	$total='';
	$list=pdo_getslice('jy_jdk_orders',$params,array($pindex,$psize),$total,$fields,'','createtime desc');
	foreach($list as &$v){
		$v['createtime']=date('Y-m-d H:i:s',$v['createtime']);
		$v['paytime']=date('Y-m-d H:i:s',$v['paytime']);
	}
	$return['list']=$list;
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	exi($return);
}	
?>